<template>
  <div>
    <div class="title">
      <h1>{{msg}}</h1>
    </div>
     <product-item :products="cart"></product-item>
  </div>
</template>

<script>
import ProductItem from '../components/products/ProductItem'
export default {
  data () {
    return {
      msg: 'Welcome to the Cart Page'
    }
  },
  components: {
    'product-item': ProductItem
  },
  computed: {
    cart () {
      return this.$store.state.cart
    }
  }
}
</script>
<style lang='scss' scoped>
//@import url(); 引入公共css类
.product {
  border-bottom: 1px solid black;
}
.product_image{
  width: 100%;
  height:100%;
}
</style>
